package ltd.hxya.novel.common.to.book;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Value;
import ltd.hxya.novel.common.bean.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class BookTo {

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "分类id")
    private Integer catId;

    @ApiModelProperty(value = "分类名")
    private String catName;

    @ApiModelProperty(value = "作品方向，0：男频，1：女频'")
    private Boolean workDirection;

    @ApiModelProperty(value = "小说封面")
    private String picUrl;

    @ApiModelProperty(value = "小说名")
    private String bookName;

    @ApiModelProperty(value = "作者id")
    private Long authorId;

    @ApiModelProperty(value = "作者名")
    private String authorName;

    @ApiModelProperty(value = "书籍描述")
    private String bookDesc;

    @ApiModelProperty(value = "评分，预留字段")
    private Float score;

    @ApiModelProperty(value = "书籍状态，0：连载中，1：已完结")
    private Boolean bookStatus;

    @ApiModelProperty(value = "点击量")
    private Long visitCount;

    @ApiModelProperty(value = "总字数")
    private Integer wordCount;


    @ApiModelProperty(value = "是否收费，1：收费，0：免费")
    private Boolean isVip;

    @ApiModelProperty(value = "状态，0：入库，1：上架")
    private Boolean status;

    @ApiModelProperty(value = "最新目录ID")
    private Long lastIndexId;

    @ApiModelProperty(value = "最新目录名")
    private String lastIndexName;


    @ApiModelProperty(value = "最新目录更新时间")
    private LocalDateTime lastIndexUpdateTime;


    @ApiModelProperty(value = "是否已停止更新，0：未停止，1：已停止")
    private Boolean crawlIsStop;


    @ApiModelProperty(value = "爬虫源站ID")
    private Integer crawlSourceId;

    @ApiModelProperty(value = "抓取的源站小说ID")
    private String crawlBookId;

    @ApiModelProperty(value = "该小说是否被添加到数据库")
    private Boolean isAdd=false;

    @ApiModelProperty(value = "最后一次的抓取时间")
    private LocalDateTime crawlLastTime;

    private List<BookChapterTo> bookChapterTos;

}
